package org.example.hansp.recursion;

public class HanNuoTa {
    private static int moveCount = 0;
    public static void main(String[] args) {
        move(21,'A','B','C');
        System.out.println(moveCount);

    }

    public static void move(int num,char a,char b,char c) {
        if(num==1){
            System.out.println(a+"->"+c);
            moveCount++;
        }else{
            move(num-1,a,c,b);
            System.out.println(a+"->"+c);
            moveCount++;
            move(num-1,b,c,a);
        }
    }
}
